package top.wshape1.shiziapi.project.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import top.wshape1.shiziapi.project.handler.LoginContextHandler;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2024-12-10
 */

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginContextHandler()).addPathPatterns("/**");
    }
}
